<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- *  PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- *  i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->

<html>
<head>
    <!-- Generated by groovydoc (2.4.7) on Thu Dec 01 22:36:12 PST 2016 -->
    <title>ServiceCallSync (Moqui Framework 2.0.0)</title>
    <meta name="date" content="2016-12-01">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
    <link href="../../../groovy.ico" type="image/x-icon" rel="icon">
    <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
    parent.document.title="ServiceCallSync (Moqui Framework 2.0.0)";
}
//-->
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../index-all.html">Index</a></li>
        <li><a href="../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../index.html?org/moqui/service/ServiceCallSync" target="_top">Frames</a></li>
            <li><a href="ServiceCallSync.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <a name="skip-navbar_top">
        <!--   -->
    </a></div>
<!-- ========= END OF TOP NAVBAR ========= -->

<!-- ======== START OF CLASS DATA ======== -->
<div class="header">

    <div class="subTitle">Package: <strong>org.moqui.service</strong></div>

    <h2 title="[Java] Interface ServiceCallSync" class="title">[Java] Interface ServiceCallSync</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><ul class="inheritance"></ul></li><li>org.moqui.service.ServiceCallSync
</ul>
<div class="description">
    <ul class="blockList">
        <li class="blockList">

            <dl>
                <dt>All Superinterfaces:</dt>
                <dd><a href='../../../org/moqui/service/ServiceCall.html'>ServiceCall</a></dd>
            </dl>

          </li>
    </ul>
</div>

<div class="summary">
    <ul class="blockList">
        <li class="blockList">
        <!-- =========== NESTED CLASS SUMMARY =========== -->
        

        <!-- =========== ENUM CONSTANT SUMMARY =========== -->
        
        <!-- =========== FIELD SUMMARY =========== -->
        

        <!-- =========== PROPERTY SUMMARY =========== -->
        

        <!-- =========== ELEMENT SUMMARY =========== -->
        

        

        
        <!-- ========== METHOD SUMMARY =========== -->
        <ul class="blockList">
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
                        <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Type</th>
                            <th class="colLast" scope="col">Name and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.util.Map&lt;java.lang.String, java.lang.Object&gt;</strong></code></td>
                            <td class="colLast"><code><strong><a href="#call()">call</a></strong>()</code><br>Call the service synchronously and immediately get the result.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#disableAuthz()">disableAuthz</a></strong>()</code><br>Disable authorization for the current thread during this service call.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#ignorePreviousError(boolean)">ignorePreviousError</a></strong>(boolean ipe)</code><br>Normally service won't run if there was an error (ec.message.hasError()), set this to true to run anyway.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#ignoreTransaction(boolean)">ignoreTransaction</a></strong>(boolean ignoreTransaction)</code><br>By default a service uses the existing transaction or begins a new one if no tx is in place. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#multi(boolean)">multi</a></strong>(boolean mlt)</code><br>If true expect multiple sets of parameters passed in a single map, each set with a suffix of an underscore
 and the row of the number, ie something like "userId_8" for the userId parameter in the 8th row.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#name(java.lang.String)">name</a></strong>(java.lang.String serviceName)</code><br>Name of the service to run. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#name(java.lang.String, java.lang.String)">name</a></strong>(java.lang.String verb, java.lang.String noun)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#name(java.lang.String, java.lang.String, java.lang.String)">name</a></strong>(java.lang.String path, java.lang.String verb, java.lang.String noun)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#parameter(java.lang.String, java.lang.Object)">parameter</a></strong>(java.lang.String name, java.lang.Object value)</code><br>Single name, value pairs to put in the context (in parameters) passed to the service.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#parameters(Map<String, ?>)">parameters</a></strong>(java.util.Map&lt;java.lang.String, ?&gt; context)</code><br>Map of name, value pairs that make up the context (in parameters) passed to the service.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#requireNewTransaction(boolean)">requireNewTransaction</a></strong>(boolean requireNewTransaction)</code><br>If true suspend/resume the current transaction (if a transaction is active) and begin a new transaction for the
 scope of this service call.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#transactionTimeout(int)">transactionTimeout</a></strong>(int timeout)</code><br>Override the transaction-timeout attribute in the service definition, only used if a transaction is begun in this service call.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#useTransactionCache(boolean)">useTransactionCache</a></strong>(boolean useTransactionCache)</code><br>Use the write-through TransactionCache.</td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Inherited Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
                        <caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Methods inherited from class</th>
                            <th class="colLast" scope="col">Name</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>interface <a href='../../../org/moqui/service/ServiceCall.html'>ServiceCall</a></strong></code></td>
                            <td class="colLast"><code><a href='../../../org/moqui/service/ServiceCall.html#getCurrentParameters()'>getCurrentParameters</a>, <a href='../../../org/moqui/service/ServiceCall.html#getServiceName()'>getServiceName</a></code></td>
                        </tr>
                    </table>
                   </ul>
              </li>
                
        </ul>
        
    </li>
    </ul>
</div>

<div class="details">
    <ul class="blockList">
        <li class="blockList">
           

            

            

            

            


            
            <!-- =========== METHOD DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="method_detail">
                    <!--   -->
                </a>
                    <h3>Method Detail</h3>
                    
                        <a name="call()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;java.util.Map&lt;java.lang.String, java.lang.Object&gt; <strong>call</strong>()</h4>
                                <p> Call the service synchronously and immediately get the result.
     <DL><DT><B>Returns:</B></DT><DD>Map containing the result (out parameters) from the service call.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="disableAuthz()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>disableAuthz</strong>()</h4>
                                <p> Disable authorization for the current thread during this service call. </p>
                            </li>
                        </ul>
                    
                        <a name="ignorePreviousError(boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>ignorePreviousError</strong>(boolean ipe)</h4>
                                <p> Normally service won't run if there was an error (ec.message.hasError()), set this to true to run anyway. </p>
                            </li>
                        </ul>
                    
                        <a name="ignoreTransaction(boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>ignoreTransaction</strong>(boolean ignoreTransaction)</h4>
                                <p> By default a service uses the existing transaction or begins a new one if no tx is in place. Set this flag to
 ignore the transaction, not checking for one or starting one if no transaction is in place. </p>
                            </li>
                        </ul>
                    
                        <a name="multi(boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>multi</strong>(boolean mlt)</h4>
                                <p> If true expect multiple sets of parameters passed in a single map, each set with a suffix of an underscore
 and the row of the number, ie something like "userId_8" for the userId parameter in the 8th row.
     <DL><DT><B>Returns:</B></DT><DD>Reference to this for convenience.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="name(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>name</strong>(java.lang.String serviceName)</h4>
                                <p> Name of the service to run. The combined service name, like: "${path}.${verb}${noun}". To explicitly separate
 the verb and noun put a hash (#) between them, like: "${path}.${verb}#${noun}" (this is useful for calling the
 implicit entity CrUD services where verb is create, update, or delete and noun is the name of the entity).
     </p>
                            </li>
                        </ul>
                    
                        <a name="name(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>name</strong>(java.lang.String verb, java.lang.String noun)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="name(java.lang.String, java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>name</strong>(java.lang.String path, java.lang.String verb, java.lang.String noun)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="parameter(java.lang.String, java.lang.Object)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>parameter</strong>(java.lang.String name, java.lang.Object value)</h4>
                                <p> Single name, value pairs to put in the context (in parameters) passed to the service. </p>
                            </li>
                        </ul>
                    
                        <a name="parameters(Map<String, ?>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>parameters</strong>(java.util.Map&lt;java.lang.String, ?&gt; context)</h4>
                                <p> Map of name, value pairs that make up the context (in parameters) passed to the service. </p>
                            </li>
                        </ul>
                    
                        <a name="requireNewTransaction(boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>requireNewTransaction</strong>(boolean requireNewTransaction)</h4>
                                <p> If true suspend/resume the current transaction (if a transaction is active) and begin a new transaction for the
 scope of this service call.
     <DL><DT><B>Returns:</B></DT><DD>Reference to this for convenience.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="transactionTimeout(int)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>transactionTimeout</strong>(int timeout)</h4>
                                <p> Override the transaction-timeout attribute in the service definition, only used if a transaction is begun in this service call. </p>
                            </li>
                        </ul>
                    
                        <a name="useTransactionCache(boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>public&nbsp;<a href='../../../org/moqui/service/ServiceCallSync.html'>ServiceCallSync</a> <strong>useTransactionCache</strong>(boolean useTransactionCache)</h4>
                                <p> Use the write-through TransactionCache.

 WARNING: test thoroughly with this. While various services will run much faster there can be issues with no
 changes going to the database until commit (for view-entity queries depending on data, etc).

 Some known limitations:
 - find list and iterate don't cache results (but do filter and add to results aside from limitations below)
 - EntityListIterator.getPartialList() and iterating through results with next/previous does not add created values
 - find with DB limit will return wrong number of values if deleted values were in the results
 - find count doesn't add for created values, subtract for deleted values, and for updates if old matched and new doesn't subtract and vice-versa
 - view-entities won't work, they don't incorporate results from TX Cache
 - if a value is created or updated, then a record with FK is created, then the value is updated again commit writes may fail with FK violation (see update() method for other notes)
 - queries that do for-update may be unreliable as with the TX cache in place we only do a query to lock the value but don't merge the results
     <DL><DT><B>Returns:</B></DT><DD>Reference to this for convenience.</DD></DL></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            
        </li>
    </ul>
</div>

<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../index-all.html">Index</a></li>
        <li><a href="../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../index.html?org/moqui/service/ServiceCallSync" target="_top">Frames</a></li>
            <li><a href="ServiceCallSync.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <p>Groovy Documentation</p>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a>
    </div>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
